|
index > juli formatting
Juli document format syntax is a very small subset of RD, but some syntax are a little bit of different.
Beggining '=' in line means header. 6 level headers can be used as follows:
Example:
= NAME juli - Outline processor = SYNOPSIS juli [-g generator] file
will be what you see at juli(1) page...
The line starts with "1. " (One dot space) is recognized as ordered list. Not only '1' but also any number can be used. However, actual assigned numbers for ordered-list starts '1' and increments 1 for each.
Example:
|1. Hello |1. World |1. This is a pen.
will be:
(Please ignore '|' above. It just let juli(1) interpret to quote, not ordered list).
When putting leading spaces, it is interpreted as nested list. Example:
|1. Hello | 1. Welcome | 1. juli |1. World
will be:
(Where, please ignore '|' above).
When length of a list becomes longer than editor window width, next line can be the continued line of the list if it starts with the same offset as follows:
|A group is a set, G, together with an operation • (called the |group law of G) that combines any two elements a and b to form |another element, denoted a • b or ab. To qualify as a group, |the set and operation, (G, •), must satisfy four requirements |known as the group axioms: | |1. For all a, b in G, the result of the operation, a • b, | is also in G. |1. For all a, b and c in G, (a • b) • c = a • (b • c). |1. There exists an element e in G, such that for every element a in G, | the equation e • a = a • e = a holds. | The identity element of a group G is often written as 1 or 1G, | a notation inherited from the multiplicative identity. |1. For each a in G, there exists an element b in G such that | a • b = b • a = 1G. | |(from http://en.wikipedia.org/wiki/Group_%28mathematics%29 )
will be:
(from http://en.wikipedia.org/wiki/Group_%28mathematics%29 )
(Where, please ignore '|' and <hr> line above. Those are just for explanation purpose).
The line starts with "* " (astarisk space) is recognized as unordered list.
Example:
|* Hello |* World |* This is a pen.
will be:
When putting leading spaces, it is interpreted as nested list. Example:
|* Hello | * Welcome | * juli |* World
will be:
(Where, please ignore '|' above).
Same as ordrered list. See ordered list.
The line with the following form is recognized as compact dictionary list:
term:: description ...
Example:
Ruby:: programing language, or a gem Juli:: an offline wiki, July in English
will be:
Ruby: | programing language, or a gem |
Juli: | an offline wiki, July in English |
The line with the following form is recognized as dictionary list:
term:: description statement description statement(continued) ...
Example:
Ruby:: programing language, or a gem Juli:: an offline wiki, July in English, or a character in a famous comic written by Moto Hagio.
will be:
Both ordered and unordered list can be nested each other. Example:
|1. Hello | * Welcome | * juli |1. World
will be:
Dictionary list (Compact Dictionary list also) can be written in Ordered/Unordered list. Offset should be the same as previous list item as follows:
|* f = ma | f:: force | m:: mass | a:: accelaration |* e = mc2 | e:: | energy | m:: | mass | c:: | light speed, | 299,792,458 [m/s]
will be:
f: | force |
m: | mass |
a: | accelaration |
The line with leading spaces is recognized as blockquote. Where, spaces should longer than Baseline.
Block Quote can contain WHITELINE.
Example:
| "The load to hell is paved with good intentions." | | -- derived proverb from original thought of Saint Bernard of Clairvaux
will be:
"The load to hell is paved with good intentions." -- derived proverb from original thought of Saint Bernard of Clairvaux
(Where, '|' above is to avoid deleting spaces. Please ignore it.)
Block Quote can be written in list.
Example:
|1. A | B | What did you do? |1. C
will be:
What did you do?B
When text contains URL like http://..., it is automatically hyperlinked. Currently, http, https, mailto, and ftp are supported.
Example:
Please look at http://w3c.org if you are not familiar with HTML.
will be:
Please look at http://w3c.org if you are not familiar with HTML.
\{...} is juli macro. Following macros are supported:
\{!...}: | Escaping wikiname |
\{amazon ASIN}: | amazon association link |
\{jmap coord}: | embed Google map. See jmap(macro). |
\{photo path}: | embed photo(image). See photo(macro). |
\{tag tag1 tag2 ...}: | define tags. See tag(macro). |
\{template name}: | specify template of this document. See template(macro). |
\{wikipedia word}: | Interwiki to Wikipedia. See wikipedia(macro). |
Please see the followings or links for the details.
\{!...} notation escapes wikiname. Example:
\{!tutorial}, in general meaning, shouldn't link to juli's tutorial docment.
will be:
tutorial, in general meaning, shouldn't link to juli's tutorial docment.
NOTE: Following special cases are automatically escaped:
Sorry for this incompatibility between v1.08 and v1.09:
<=v1.08: | \{wikiname} |
>=v1.09: | \{!wikiname} |
This is my favorite book.
This is generated by the following juli macro calling:
This is my favorite book. \{amazon 4048538098}
Amazon association link tag like the above can be embedded at any place in juli text (>= v1.09) with ASIN parameter. Above example's ASIN is 4048538098 which is an ID in Amazon to referre my favorite book "Gundam; The Origin". Of course, you can use any ASIN for your amazon association in juli. General notation is as follows:
\{amazon ASIN}
You can find ASIN in amazon association site.
The HTML template for the amazon association link can be defined at .juli/config file's "amazon" entry like this:
amazon: '<iframe src="http://rcm-jp.amazon.co.jp/e/cm?t=YOUR_ID...asins=%{asins}..." ...></iframe>'
Where,
HTML tag can be written anyplace so you can use any html as follows:
You can use any HTML. However, juli markup syntax is higher priority. So, for example, tag nesting doesn't work because leading space at line is recognized as blockquote.
Bad Example:
|<table> | <tr><td>A</td><td>B</td></tr> | <tr><td>C</td><td>D</td></tr> |</table>
(Where, '|' above is to avoid deleting spaces. Please ignore it.)